こんばんは
Railsでviewを作成している時に、helperからlink_toを使いたい時って結構あるのではないかと思います。
やり方は簡単です。
module ExampleHelper def example(word) link_to word, 'https://www.google.co.jp/', target: "_blank" end end
これでhelperからlink_toが使えるようになりました。
– Bucket of cotegg –
投稿日:
こんばんは
Railsでviewを作成している時に、helperからlink_toを使いたい時って結構あるのではないかと思います。
やり方は簡単です。
module ExampleHelper def example(word) link_to word, 'https://www.google.co.jp/', target: "_blank" end end
これでhelperからlink_toが使えるようになりました。
執筆者:asakos
関連記事
VivaldiのWEBパネルに登録して便利だったサイトを紹介する
こんばんは VivaldiのWEBパネルはとても便利です。 今回はWEBパネルに …
fullpage.jsでコンテンツを画面幅いっぱいでスクロールさせる。
fullpage.jsとは fullpage.jsは一つのコンテンツを画面いっぱ …
【ionic】Cannot read property ‘startTrackerWithId’ of undefined だとよ
どうも中田です。 GoogleAnalyticsプラグインを導入したのですが、A …
[wordpress]各固定ページに個別のCSSを読み込ませる
こんばんは wordpreddでオリジナルテーマを作成している時、各固定ページに …
2020/05/31
【Angular】component.htmlをprettierで整形する
2020/05/24
【Angular】Full calendarで横スクロールを実装
2020/05/10
document.querySelectorで色々なDOMを取得する
2020/05/09
Quarantine Improvement: Creating Anything